package com.atguigu.gmall.order.mapper;


import com.atguigu.gmall.model.order.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.atguigu.gmall.order.domain.OrderInfo1
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    void closeOrder(@Param("orderInfo") OrderInfo orderInfo,@Param("orderStatus") String orderStatus);

    void updateOrderStatusToPaid(@Param("userId") Long userId,
                                 @Param("outTradeNo") String outTradeNo,
                                 @Param("processStatus") String processStatus,
                                 @Param("orderStatus") String orderStatus);

    List<OrderInfo> prepareWareOrderTo(@Param("userId") long userId, @Param("outTradeNo") String outTradeNo);

    void updateOrderStatusToSplit(@Param("id") Long id, @Param("userId") Long userId, @Param("processStatus") String processStatus , @Param("orderStatus") String orderStatus);

    void updateOrderStatusByStock(@Param("orderId") Long orderId, @Param("orderStauts") String orderStauts, @Param("processStatus") String processStatus);
}




